package com.slz3.business.module.configManagement.conIndexVideo.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.configManagement.conIndexVideo.domain.ConIndexVideo;
import com.slz3.business.module.configManagement.conIndexVideo.domain.ConIndexVideoCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConIndexVideoResController {

    static Mono<ServerResponse> add(ServerRequest req, ConIndexVideo conIndexVideo) {
        if (ConIndexVideoResUnsafeValid.add(req, conIndexVideo)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResAtomic.add_$ConIndexVideoUpdateLock(req, conIndexVideo);
        }
    }

    static final Mono<ServerResponse> delete(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        if (ConIndexVideoResUnsafeValid.delete(req, conIndexVideoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResAtomic.delete_$ConIndexVideoUpdateLock(req, conIndexVideoCondition);
        }
    }

    static Mono<ServerResponse> modify(ServerRequest req, ConIndexVideo conIndexVideo) {
        if (ConIndexVideoResUnsafeValid.modify(req, conIndexVideo)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResAtomic.modify_$ConIndexVideoUpdateLock(req, conIndexVideo);
        }
    }

    static Mono<ServerResponse> list(ServerRequest req) {
        if (ConIndexVideoResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResExecutor.list(req);
        }
    }

    static Mono<ServerResponse> info(ServerRequest req) {
        if (ConIndexVideoResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResAtomic.info_$ConIndexVideoUpdateLock(req);
        }
    }

    static Mono<ServerResponse> choice(ServerRequest req) {
        if (ConIndexVideoResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResExecutor.choice(req);
        }
    }

    static final Mono<ServerResponse> auditSubmit(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        //
        if (ConIndexVideoResUnsafeValid.auditSubmit(req, conIndexVideoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResAtomic.auditSubmit_$ConIndexVideoUpdateLock(req, conIndexVideoCondition);
        }
    }

    static final Mono<ServerResponse> audit(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        if (ConIndexVideoResUnsafeValid.audit(req, conIndexVideoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResAtomic.audit_$ConIndexVideoUpdateLock(req, conIndexVideoCondition);
        }
    }

    static final Mono<ServerResponse> auditReject(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        if (ConIndexVideoResUnsafeValid.auditReject(req, conIndexVideoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResAtomic.auditReject_$ConIndexVideoUpdateLock(req, conIndexVideoCondition);
        }
    }

    static final Mono<ServerResponse> usingEnable(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        if (ConIndexVideoResUnsafeValid.usingEnable(req, conIndexVideoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResAtomic.usingEnable_$ConIndexVideoUpdateLock(req, conIndexVideoCondition);
        }
    }

    static final Mono<ServerResponse> usingDisable(ServerRequest req, ConIndexVideoCondition conIndexVideoCondition) {
        if (ConIndexVideoResUnsafeValid.usingDisable(req, conIndexVideoCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return ConIndexVideoResAtomic.usingDisable_$ConIndexVideoUpdateLock(req, conIndexVideoCondition);
        }
    }

}
